﻿using Ebusiness_UserService.DomainEvent.User;
using Ebusiness_UserService.Model;
using Volo.Abp.Domain.Repositories;

namespace Ebusiness_UserService.Repositorys
{
    public interface IUserRepository : IRepository<User,Guid>
    {
        Task<User?> FindOneAsync(PhoneNumber phoneNumber);
        Task<User?> FindOneAsync(Guid userld); 
        //添加登录历史
        Task AddNewLoginHistoryAsync(PhoneNumber phoneNumber, string msg); 
        //存储登录验证码
        Task SavePhoneCodeAsync(PhoneNumber phoneNumber, string code);
        //
        Task<string?> RetrievePhoneCodeAsync(PhoneNumber phoneNumber);

        Task PublishEventAsync(UserAccessResultEvent eventData);

        Task<string?> FindPhoneNumberCodeAsync(PhoneNumber phoneNumber);
    }
}
